<script>
import HeaderYun from "@/components/headerYun.vue";
import mineMixin from "@/mixin/myMixin";

export default {
  name: "pageB",

  components: {HeaderYun},
  mixins: [mineMixin],
  methods:{
    showModal(){
      if(this.$store.state.user.isLogin) {
        this.$router.push("/pageA");
      }else {
        this.$store.commit("setVisible",true);
      }
    },
    changeB(){

    }
  },

  created(){
    // 1、声明式   （1）path query   获取参数
    console.log(this.$route,'$route')
    console.log(this.$route.query)
    console.log(this.$route.query.id)

    // 1、声明式   （2）name params    获取参数
    // console.log(this.$route.params)

    console.log(this.mixinMsg)
  }
}
</script>

<template>
<div>
  pageB
  <header-yun></header-yun>
  <button @click="showModal">显示modal</button>
  <button @click="changeB">B修改msg</button>
</div>
</template>

<style scoped lang="less">

</style>